package com.hos.db.entity;

import com.fasterxml.jackson.annotation.JsonIgnore;
import com.hos.net.res.BaseResponse;
import com.hos.utile.JsonUtile;
import com.hos.utile.StringUtile;

import java.util.Date;
import java.util.List;

/**
 * Created by Administrator on 2018/8/24 0024.
 */

public class UserPatsEntity {
    //医患关系id
    private String relationId;
    //备注患者
    private String patRemark;
    //备注患者图片
    @JsonIgnore
    private String patRemarkImages;
    private List<String> patRemarkImgs;
    //患者id
    private String patId;
    //患者姓名
    private String patName;
    //患者手机号
    private String patPhone;
    //患者账号
    private String patAccount;
    //患者密码
    private String patPwd;
    //患者昵称
    private String patNickname;
    //患者地址
    private String patAddress;
    //年龄
    private String patBirthday;
    //性别
    private String patSex;
    //患者地址
    private String patPortrait;
    //微信id
    private String patWXId;
    //状态 1：审核状态 2：审核通过状态
    private String patState;
    private Date patRegisterTime;
    private String patIdentityNumber;
    private String patPushid;

    public String getPatPushid() {
        return patPushid;
    }

    public void setPatPushid(String patPushid) {
        this.patPushid = patPushid;
    }

    public String getPatIdentityNumber() {
        return patIdentityNumber;
    }

    public void setPatIdentityNumber(String patIdentityNumber) {
        this.patIdentityNumber = patIdentityNumber;
    }

    public Date getPatRegisterTime() {
        return patRegisterTime;
    }

    public void setPatRegisterTime(Date patRegisterTime) {
        this.patRegisterTime = patRegisterTime;
    }

    public String getPatWXId() {
        return patWXId;
    }

    public void setPatWXId(String patWXId) {
        this.patWXId = patWXId;
    }

    public String getPatState() {
        return patState;
    }

    public void setPatState(String patState) {
        if (StringUtile.isEmpty(patState)) {
            patState = "0";
        }
        this.patState = patState;
    }

    public String getPatId() {
        return patId;
    }

    public void setPatId(String patId) {
        this.patId = patId;
    }

    public String getPatName() {
        return patName;
    }

    public void setPatName(String patName) {
        this.patName = patName;
    }

    public String getPatPhone() {
        return patPhone;
    }

    public void setPatPhone(String patPhone) {
        this.patPhone = patPhone;
    }

    public String getPatAccount() {
        return patAccount;
    }

    public void setPatAccount(String patAccount) {
        this.patAccount = patAccount;
    }

    public String getPatPwd() {
        return patPwd;
    }

    public void setPatPwd(String patPwd) {
        this.patPwd = patPwd;
    }

    public String getPatNickname() {
        return patNickname;
    }

    public void setPatNickname(String patNickname) {
        this.patNickname = patNickname;
    }

    public String getPatPortrait() {
        return patPortrait;
    }

    public void setPatPortrait(String patPortrait) {
        this.patPortrait = patPortrait;
    }

    public String getRelationId() {
        return relationId;
    }

    public void setRelationId(String relationId) {
        this.relationId = relationId;
    }

    public String getPatRemark() {
        return patRemark;
    }

    public void setPatRemark(String patRemark) {
        this.patRemark = patRemark;
    }

    @JsonIgnore
    public String getPatRemarkImages() {
        return patRemarkImages;
    }

    @JsonIgnore
    public void setPatRemarkImages(String patRemarkImages) {
        this.patRemarkImages = patRemarkImages;
        if (StringUtile.isEmpty(patRemarkImages)) {
            return;
        }
        patRemarkImgs = (List<String>) JsonUtile.json2Obj(patRemarkImages, List.class, String.class);
    }

    public List<String> getPatRemarkImgs() {
        return patRemarkImgs;
    }

    public void setPatRemarkImgs(List<String> patRemarkImgs) {
        this.patRemarkImgs = patRemarkImgs;
    }

    public String getPatAddress() {
        return patAddress;
    }

    public void setPatAddress(String patAddress) {
        this.patAddress = patAddress;
    }

    public String getPatBirthday() {
        return patBirthday;
    }

    public void setPatBirthday(String patBirthday) {
        this.patBirthday = patBirthday;
    }

    public String getPatSex() {
        return patSex;
    }

    public void setPatSex(String patSex) {
        this.patSex = patSex;
    }

    @JsonIgnore
    public String toJson(String msg) {
        BaseResponse<UserPatsEntity> baseResponse = new BaseResponse();
        baseResponse.obj = this;
        baseResponse.code = "0";
        if (msg == null) {
            msg = "操作成功";
        }
        baseResponse.msg = msg;
        return baseResponse.toJson();
    }
}
